<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ExplorerComboGadget</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ExplorerComboGadget()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>ExplorerComboGadget</b></font>(#Gadget, x, y, Width, Height, Directory$, [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Creates a ComboBox that lets you display a path and all its parent folders, so the user can 
choose one of them. 
You can find such a ComboBox, for example, in the <a href="../requester/openfilerequester.html">OpenFileRequester()</a>. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
 
A number to identify the new gadget. <a href="../reference/purebasic_objects.html">#PB_Any</a> can 
be used to auto-generate this number. 

 

</td></tr>
<tr><td><i>x, y, Width, Height</i></td>
<td> 
 
The position and dimensions of the new gadget. 

 

</td></tr>
<tr><td><i>Directory$</i></td>
<td> 
 
The initial displayed directory (must be set as full path), an empty string specifies the root folder. 
<br>
<br>
If the #PB_Explorer_DrivesOnly flag is set, Directory$ may only be a drive letter. Everything that follows 
the drive letter in this case will be ignored. 

 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
 
Flags to modify the gadget behavior. This can be a combination of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Explorer_DrivesOnly</font>   : The gadget will only display drives to choose from.
  <font color="#924B72">#PB_Explorer_Editable</font>     : The gadget will be editable with an autocomplete feature. With this flag set, it acts exactly like the one in Windows Explorer.
  <font color="#924B72">#PB_Explorer_NoMyDocuments</font>: The 'My Documents' Folder will not be displayed as a separate item.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Returns nonzero on success and zero on failure. If <font color="#924B72">#PB_Any</font> was used as the #Gadget parameter 
then the return-value is the auto-generated gadget number on success. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



The following functions can be used to control the gadget: 
<br>
<br>
- <a href="getgadgettext.html">GetGadgetText()</a>: Get the currently displayed directory. Use this to check what the user has selected after you get an event for this Gadget. 
<br>
- <a href="setgadgettext.html">SetGadgetText()</a>: Changes the currently displayed directory. 
<br>
<br>

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 0, 0, 400, 45, "ExplorerComboGadget", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#006666">    ExplorerComboGadget</font>(0, 10, 10, 380, 25,<font color="#006666"> GetHomeDirectory</font>(), <font color="#924B72">#PB_Explorer_Editable</font>)
    <b><font color="#006666">Repeat</font></b> 
      Event =<font color="#006666"> WaitWindowEvent</font>()
    <b><font color="#006666">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

<p><img src="../HelpPictures/explorercombogadget.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="getgadgettext.html">GetGadgetText()</a>, <a href="setgadgettext.html">SetGadgetText()</a>, <a href="explorerlistgadget.html">ExplorerListGadget()</a>, <a href="explorertreegadget.html">ExplorerTreeGadget()</a>, <a href="comboboxgadget.html">ComboBoxGadget()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=editorgadget.html>EditorGadget()</a> - <a href=index.html>Gadget Index</a> - <a href=explorerlistgadget.html>ExplorerListGadget()</a> -&gt;



</body></html>